package com.cloud.job.config;

import org.springframework.context.annotation.Configuration;

/**
 * @author 杨斌
 * 2024-12-2024-12-26
 */
@Configuration
public class DataSourceConfig {

//    @Autowired
//    private DynamicRoutingDataSource dynamicRoutingDataSource;
//
//    @Bean(name = "mysqlNamedParameterJdbcTemplate")
//    public NamedParameterJdbcTemplate mysqlNamedParameterJdbcTemplate() {
//        DataSource mysqlDataSource = dynamicRoutingDataSource.getDataSource("master");
//        if (mysqlDataSource == null) {
//            throw new IllegalStateException("dorisDataSource not found in DynamicRoutingDataSource");
//        }
//        return new NamedParameterJdbcTemplate(mysqlDataSource);
//    }

}
